#ifndef __STDLIB_H__
#define __STDLIB_H__

#include <inc/types.h>

void *malloc(size_t size);

void * memset(void *dst, int c, size_t len);
static inline void *
calloc(unsigned count, unsigned size)
{
	 void *r = malloc(count * size);
	 if (r != (void *)0) memset(r, 0, count * size);
	 return r;
}
	 
void  free(void *ptr);

void *pmalloc(size_t size, int dma);
void  pfree(void *ptr);

void *bmalloc(size_t size);
void  bfree(void *ptr);

void *vmalloc(size_t size, physaddr_t paddr);
void  vfree(void *ptr);

#endif
